package com.example.pengsiyuan.ppbluetoothle.util;

import com.peng.ppscalelibrary.BleManager.Model.BleEnum;
import com.peng.ppscalelibrary.BleManager.Model.BleUserModel;
import com.peng.ppscalelibrary.BleManager.Model.LFPeopleGeneral;

public class DataUtil {
    private static DataUtil dataUtil;
    private LFPeopleGeneral bodyDataModel;
    private BleUserModel userModel;
    public static  DataUtil util(){
        if (dataUtil == null){
            synchronized (DataUtil.class){
                if (dataUtil == null){
                    dataUtil = new DataUtil();
                }
            }
        }
        return dataUtil;
    }

    public DataUtil() {
        bodyDataModel = new LFPeopleGeneral();
        userModel = new BleUserModel(180,18,BleEnum.BleSex.Male,BleEnum.BleUnit.BLE_UNIT_KG, 0);
    }

    public void setBodyDataModel(LFPeopleGeneral bodyDataModel) {
        this.bodyDataModel = bodyDataModel;
    }

    public void setUserModel(BleUserModel userModel) {
        this.userModel = userModel;
    }

    public LFPeopleGeneral getBodyDataModel() {
        return bodyDataModel;
    }

    public BleUserModel getUserModel() {
        return userModel;
    }
}
